IF EXISTS (SELECT * FROM SYSOBJECTS WHERE name='fnGetValorParametro' and XTYPE='FN')
BEGIN
	DROP FUNCTION [dbo].[fnGetValorParametro]
END
GO
CREATE FUNCTION fnGetValorParametro
(
	@CodParametro VARCHAR(64)
)
RETURNS VARCHAR(32)
WITH ENCRYPTION
AS
BEGIN
	DECLARE @RETURN VARCHAR(128)=''
	SELECT @RETURN=Valor FROM [SeguridadParametro] WHERE CodParametro=@CodParametro
	RETURN @RETURN
END
GO
